"高亮开启/关闭	on/off
syntax	on

"vim 键位重新配置
noremap	p	P
noremap	P	p
noremap	b	e
noremap	e	w
noremap	w	b
"y复制改为c
noremap	c	y	
noremap	C	Y
"c修改当前到下一个目标字符间的东西
noremap y 	c
noremap Y	C		
"输入和方向键修改
noremap	j	h
noremap	k	j
noremap i	k
noremap h	i
noremap	j	h
noremap	k	j
noremap i	k
noremap h	i
noremap ]	>
noremap [	<
noremap <	[
noremap >	]
noremap	x	g
noremap	X	G
noremap	g	x
noremap	G	X
"   S 快速保存
map 	S 	:w<CR>
map	s	<nop>
"   Q 快速退出
map 	Q 	:q<CR>
"   R 快速从新初始化vim
map 	W 	:source $MYVIMRC<CR>

"分屏操作
map 	sl	:set splitright<CR>:vsplit<CR>
map 	sj	:set nosplitright<CR>:vsplit<CR>
map 	si	:set nosplitbelow<CR>:split<CR>
map 	sk	:set splitbelow<CR>:split<CR>

"替换控制行为控制块
" map	V	<C-v>
"修改光标位置
map 	<SPACE>l	<C-w>l
map 	<SPACE>j	<C-w>h
map 	<SPACE>i	<C-w>k
map 	<SPACE>k	<C-w>j
"修改分屏比例
" map	r		<nop>
" map ri		:res +5<CR>
" map	rk		:res -5<CR>
" map	rl		:vertical resize-5<CR>
" map rj		:vertical resize+5<CR>
" 新建一个table屏
map	t		<nop>
map	t<space>	:tabe<CR>
map	tj		:-tabnext<CR>
map	tl		:+tabnext<CR>
map	FF		:NERDTreeToggle<CR>

map <up> :res +5<CR>
map <down> :res -5<CR>
map <left> :vertical resize-5<CR>
map <right> :vertical resize+5<CR>


"vim 基本配置
set nocompatible        	" be iMproved, required  
set number              	"行号显示
set relativenumber     		"行相对位置显示
set cursorline          	"当前行下划线显示
set wrap                	"控制字符不会超出显示区域
set showcmd             	"s
set wildmenu            	"vim命令自动补全
"vim 搜索功能配置
set hlsearch            	"开启搜索高亮
"       搜索记录清除
exec "nohlsearch"
set incsearch           	"全文
set ignorecase          	"开启忽略大小写
set smartcase           	"智能大小写，
                        	"全小写情况下不区分大小写
                        	"大小写混合时进行全部配置
set completeopt=longest,menu

set nocompatible
filetype on
filetype indent on
filetype plugin on
filetype plugin indent on

set tabstop=4
set shiftwidth=4
set softtabstop=4
"调用鼠标功能
set mouse=a
" 自动缩进
set autoindent

"tab键入标记。
set list
set listchars=tab:▸\ ,trail:▫
"退格到首回上一行尾部
set backspace=indent,eol,start
"代码折叠
set foldmethod=indent
set foldlevel=99
"状态栏行数设置
set laststatus=2
"可以在当前目录下执行命令
set autochdir

set textwidth=80
"光标在上一次文件存储位置
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif




"set rtp+=~/.vim/bundle/Vundle.vim
call plug#begin('~/.vim/plugged')

Plug 'vim-airline/vim-airline'
Plug 'connorholyday/vim-snazzy'

" File navigation
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'

" Taglist
Plug 'majutsushi/tagbar', { 'on': 'TagbarOpenAutoClose' }

" Error checking
Plug 'w0rp/ale'

" Auto Complete
Plug 'Valloric/YouCompleteMe'
let g:ycm_global_ycm_extra_conf='~/.vim/plugged/YouCompleteMe/.ycm_extra_conf.py'
" Undo Tree
Plug 'mbbill/undotree/'

" Other visual enhancement
Plug 'nathanaelkane/vim-indent-guides'
Plug 'itchyny/vim-cursorword'

" Git
" Plug 'rhysd/conflict-marker.vim'
" Plug 'tpope/vim-fugitive'
" Plug 'mhinz/vim-signify'
" Plug 'gisphm/vim-gitignore', { 'for': ['gitignore', 'vim-plug'] }
" 
" HTML, CSS, JavaScript, PHP, JSON, etc.
Plug 'elzr/vim-json'
Plug 'hail2u/vim-css3-syntax'
Plug 'spf13/PIV', { 'for' :['php', 'vim-plug'] }
Plug 'gko/vim-coloresque', { 'for': ['vim-plug', 'php', 'html', 'javascript', 'css', 'less'] }
Plug 'pangloss/vim-javascript', { 'for' :['javascript', 'vim-plug'] }
Plug 'mattn/emmet-vim'

" Python
Plug 'vim-scripts/indentpython.vim'

" Markdown
Plug 'iamcco/markdown-preview.nvim'
", { 'do': { -> mkdp#util#install_sync() }, 'for' :['markdown', 'vim-plug'] }
Plug 'dhruvasagar/vim-table-mode', { 'on': 'TableModeToggle' }
Plug 'vimwiki/vimwiki'

" Bookmarks
Plug 'kshenoy/vim-signature'

" Other useful utilities
Plug 'terryma/vim-multiple-cursors'
Plug 'junegunn/goyo.vim' " distraction free writing mode
Plug 'tpope/vim-surround' " type ysks' to wrap the word with '' or type cs'` to change 'word' to `word`
Plug 'godlygeek/tabular' " type ;Tabularize /= to align the =
Plug 'gcmt/wildfire.vim' " in Visual mode, type i' to select all text in '', or type i) i] i} ip
Plug 'scrooloose/nerdcommenter' " in <space>cc to comment a line

" Dependencies
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'kana/vim-textobj-user'
Plug 'fadein/vim-FIGlet'


call plug#end()


